/*
 * @Author: lxj l18762185937@163.com
 * @Date: 2022-09-16 08:53:59
 * @LastEditors: lxj l18762185937@163.com
 * @LastEditTime: 2022-09-16 09:12:37
 * @FilePath: \9.16李雪军作业\my-work\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Layout from '../views/LayoutView.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/Layout',
    name: 'Layout',
    component: Layout,
    children: [
      {
        path: '/',
        name: 'home',
        component: () =>
          import(/* webpackChunkName: "about" */ '../views/HomeView.vue'),
      },
      {
        path: '/Layout/list',
        name: 'list',
        component: () =>
          import(/* webpackChunkName: "about" */ '../views/ListViwe.vue'),
      },
      {
        path: '/Layout/user',
        name: 'user',
        component: () =>
          import(/* webpackChunkName: "about" */ '../views/UserView.vue'),
      },
    ],
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
})

export default router
